package com.hnu.service.recommender;

import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.impl.model.jdbc.MySQLJDBCDataModel;

public class BookmarkDataModel extends MySQLJDBCDataModel{
	public final static String PERFERENCETABLE = "bookmarkpreference";
	public final static String USERID_COLUMN = "userId";
	public final static String ITEMID_COLUMN = "bookmarkId";
	public final static String PERFERENCE_COLUMN = "preference";
	

	public BookmarkDataModel(String dataSourceName) throws TasteException{		
		super(lookupDataSource(dataSourceName), PERFERENCETABLE, USERID_COLUMN, ITEMID_COLUMN, PERFERENCE_COLUMN);
	}

	public BookmarkDataModel() {
		super(DBUtil.getDataSource(), PERFERENCETABLE, USERID_COLUMN, ITEMID_COLUMN, PERFERENCE_COLUMN);
	}
}
